<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>clienta</title>
    <script src="websocket.js"></script>
    <script>

        var ws = new websocket({
            identify: "clienta"
        });

        ws.connect();

        function sendrandom() {
            var date = new Date();
            ws.send("clienta said:" + date.toDateString() + " " + date.toLocaleTimeString());
        }

    </script>
</head>
<body>
<button onclick="sendrandom()">发送信息</button>

</body>
</html>